package com.casi.project.portal.controller;

import com.casi.project.portal.service.IndexApiService;
import com.casi.project.portal.vo.IndexMobliVO;
import com.casi.project.portal.vo.NoticeVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Auther shp
 * @data2020/4/1311:25
 * @description
 */

@RequestMapping("/portal/indexApi")
@Api(tags = "首页相关接口")
@RestController
public class IndexApiController {

    @Autowired
    private IndexApiService service;

    @ApiOperation("返回办公/商店/服务的数据")
    @GetMapping("getAllMenu")
    public List<IndexMobliVO> getAllMenu(){
        return service.getAllMenu();
    }

   @ApiOperation("返回公告的数据")
   @GetMapping("findNotice")
   List<NoticeVO> findNotice(){
        return service.findNotice();
   }

}
